package com.ice_col.clock;

import android.os.Handler;
import android.os.Message;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TabHost;

import com.ice_col.clock.myview.ViewClock;

public class MainActivity extends AppCompatActivity {

    private TabHost mTableHost;
    private ViewClock mViewClock;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initView();
    }

    private void initView(){
        initTabHost();
    }

    private void initTabHost(){
        mTableHost=(TabHost) findViewById(R.id.clock_tabHost);
        mTableHost.setup();
        mTableHost.addTab(mTableHost.newTabSpec("clock_tabTime").setIndicator("时钟").setContent(R.id.clock_tabTime));
        mTableHost.addTab(mTableHost.newTabSpec("clock_tabClock").setIndicator("闹钟").setContent(R.id.clock_tabClock));
        mTableHost.addTab(mTableHost.newTabSpec("clock_timer").setIndicator("计时器").setContent(R.id.clock_timer));
        mTableHost.addTab(mTableHost.newTabSpec("clock_stopWatch").setIndicator("秒表").setContent(R.id.clock_stopWatch));
    }


}
